using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Add Tier</para>
    /// <para>Creates a new tier for a domain network in a utility network.</para>
    /// <para>为公共设施网络中的域网络创建新层。</para>
    /// </summary>    
    [DisplayName("Add Tier")]
    public class AddTier : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddTier()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the domain network where the tier will be added.</para>
        /// <para>包含将在其中添加层的域网络的公共设施网络。</para>
        /// </param>
        /// <param name="_domain_network">
        /// <para>Domain Network</para>
        /// <para>The domain network where the tier will be created.</para>
        /// <para>将在其中创建层的域网络。</para>
        /// </param>
        /// <param name="_name">
        /// <para>Name</para>
        /// <para>The name of the new tier. The name must be unique in the entire utility network.</para>
        /// <para>新层的名称。该名称在整个公共设施网络中必须是唯一的。</para>
        /// </param>
        /// <param name="_rank">
        /// <para>Rank</para>
        /// <para>The rank of the tier being added. The highest rank is the number 1.</para>
        /// <para>要添加的层的等级。最高等级是数字 1。</para>
        /// </param>
        public AddTier(object _in_utility_network, object _domain_network, object _name, long? _rank)
        {
            this._in_utility_network = _in_utility_network;
            this._domain_network = _domain_network;
            this._name = _name;
            this._rank = _rank;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Add Tier";

        public override string CallName => "un.AddTier";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _domain_network, _name, _rank, _topology_type.GetGPValue(), _tier_group_name, _subnetwork_field_name, _out_utility_network];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the domain network where the tier will be added.</para>
        /// <para>包含将在其中添加层的域网络的公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Domain Network</para>
        /// <para>The domain network where the tier will be created.</para>
        /// <para>将在其中创建层的域网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Domain Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _domain_network { get; set; }


        /// <summary>
        /// <para>Name</para>
        /// <para>The name of the new tier. The name must be unique in the entire utility network.</para>
        /// <para>新层的名称。该名称在整个公共设施网络中必须是唯一的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _name { get; set; }


        /// <summary>
        /// <para>Rank</para>
        /// <para>The rank of the tier being added. The highest rank is the number 1.</para>
        /// <para>要添加的层的等级。最高等级是数字 1。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rank")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _rank { get; set; }


        /// <summary>
        /// <para>Topology Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the topology type for the new tier. Subnetworks with radial and mesh topology types both support one or more subnetwork controllers. This parameter is disabled on the tool dialog box if the input domain network was created with a hierarchical tier definition and the topology type defaults to mesh. If the domain network was created with a partitioned tier definition, this parameter will have all topology types available in the drop-down list.</para>
        ///   <para>For tracing or subnetwork management, this parameter does not currently provide a difference in behavior. The functionality of this parameter is under development and will be applicable in a future release.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定新层的拓扑类型。具有径向拓扑和网状拓扑类型的子网都支持一个或多个子网控制器。如果输入域网络是使用分层层定义创建的，并且拓扑类型默认为网格，则此参数将在工具对话框中禁用。如果域网络是使用分区层定义创建的，则此参数将在下拉列表中提供所有拓扑类型。</para>
        ///   <para>对于追踪或子网管理，此参数当前不提供行为差异。此参数的功能正在开发中，并将在将来的版本中适用。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Topology Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _topology_type_value? _topology_type { get; set; } = null;

        public enum _topology_type_value
        {
            /// <summary>
            /// <para>Radial</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Radial")]
            [GPEnumValue("RADIAL")]
            _RADIAL,

            /// <summary>
            /// <para>Mesh</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Mesh")]
            [GPEnumValue("MESH")]
            _MESH,

        }

        /// <summary>
        /// <para>Tier Group Name</para>
        /// <para>The existing tier group to which the new tier will be added. This parameter is required for domain networks with a hierarchical tier definition.</para>
        /// <para>将向其添加新层的现有层组。对于具有分层层定义的域网络，此参数是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tier Group Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tier_group_name { get; set; } = null;


        /// <summary>
        /// <para>Subnetwork Field Name</para>
        /// <para>The name of the field where the subnetwork names for this tier will be stored. This is a system-maintained field that will be created the first time a tier is added to a tier group and reused for any additional tiers. For example, you have two tier groups: Distribution and Transmission. When you add a tier named system to the Distribution group and specify the subnetwork field name to be systemsubnet, the field is created. Next, you add a second tier named system to the Transmission group. This parameter will detect that the systemsubnet field should be used as the subnetwork field name. This parameter is required for hierarchical tier types.</para>
        /// <para>将存储此层的子网名称的字段的名称。这是一个系统维护的字段，将在首次将层添加到层组时创建，并重新用于任何其他层。例如，您有两个层组：“分发”和“传输”。将名为 system 的层添加到通讯组并将子网字段名称指定为 systemsubnet 时，将创建该字段。接下来，将名为 system 的第二层添加到 Transmission 组。此参数将检测是否应将 systemsubnet 字段用作子网字段名称。对于分层层类型，此参数是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Subnetwork Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _subnetwork_field_name { get; set; } = null;


        /// <summary>
        /// <para>Updated Utility Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        public AddTier SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}